home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Gem Listing (fwd)
- Date: Fri, 08 Jul 1994 18:16:04 +1000
- From: Warwick Allison <warwick@cs.uq.oz.au>
- Precedence: bulk
-
- Ken Hollis:
- >WHAT is so INCREDIBLY DIFFICULT about using objc_find to locate the editable
- >object under the mouse?? HERE IS SOME EXAMPLE CODE!!!!!!
-
- Ken, I agree, that way is very easy to code. The problem is whether it
- is of sufficiently low cost to impose it as a standard for applications
- to follow.
-
- The are two techniques for providing hot objects:
-
- 1) Wait for mouse to move out of 1x1pixel area,
- then use objc_find to work out what it is over.
-
- 2) Work out the largest rectangle around the mouse for
- which all mouse positions are above the same class
- of hot object, eg. those for which there will be
- no cursor change, then wait on this area rather
- than the 1x1 pixel area.
-
- (1) is easy to code (thank you Ken), but an inefficient use of
- events, as if 5 multitasking programs do this, then for
- every motion of the mouse, each of those programs will
- be woken up and each will call objc_find. In many cases,
- the objc_find will be very short, but it is still a system
- call for each application for every motion of the mouse.
-
- (2) is more difficult to code, but is optimal in efficient use
- of events, as events are infrequently generated.
-
-
- If pressed to implement it, I'd probably cop out and use (1). If I _wanted_
- to implement it properly for a serious application library that supported
- a standard, I would be obliged to use (2).
-
-
- Therefore, I'm arguing against using hot objects for window objects because
- I neither want to use an inefficient cop-out solution nor invest the effort
- into the thorough solution for the sake of a non-GEM, pretty on-screen
- effect.
-
-
- >I think you COMPLETELY missed what the entire idea of a GEM Master Listing
- >was for. Take, for example, the Cookie Master Listing. GEM Master Listing
- >provides exactly that same purpose: It tells programmers which Extended
- >Object Types (and such) have already been used, and if they wish to make
- >their programs compatible with those types, they refer to this list.
-
- There are 4 billion available cookies. Cookies are a global resource, while
- extended object types are not (multiple applications can be using the same
- extended object types for different purposes at the same time)... which is
- just as well, as thjere are only 256 of them.
-
- >What if you used some GEM library, say E_GEM. Now say you wrote a program
- >around it, and then decided to dump E_GEM in favor of some other (newer)
- >library? If E_GEM didn't follow the listing and decided to assign messages
- >and indices hodge-podge, your task would be damn near impossible.
-
- But if all GEM libraries are the same, why would you change from one to
- another? GEM++ for example doesn't even use the Extended Object Types
- byte. It uses full parameterized object instantiations presribed in
- the code, allowing any number of different types of object from sliders
- to scrolling self-drawing objects.
-
-
- >Also, for programmers wanting to exchange messages and events with other
- >programs, the GEM Master listing is a handy reference.
- >
- >If you like to live in your own proprietary world and never ever intend on
- >exchanging messages or events with any other programs, then maybe you don't
- >need the GEM Master listing.
-
- What do you think Drag And Drop is for? Exactly what sorts of messages
- do you have in mind? If I write a pair of apps that send each other messages,
- they can use whatever protocol I want, as it is not a shared resource.
-
- For broadcast messages, you have a point, but collecting non-broadcast
- message types is of no relevance. How many new broadcast message types
- currently exist? 0?
-
- >This is analagous to the problem with vector sharing, and is essentially
- >the reason why XBRA (and the XBRA registration list) was created.
-
- Not at all. XBRA doesn't reply on some central list of unique identifiers.
- It relies on programs following a fixed standard.
-
-
- --
- Warwick
-